package com.zmj.enums;

import java.util.Arrays;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OilcylinderEnum {
    /** 油缸类型枚举 */
    ONE(1, "推移-有位移传感器"),
    TWO(2, "推移-⽆位移传感器"),
    THREE(3, "(左、前)⽴柱"),
    FOUR(4, "(右、后)⽴柱"),
    FIVE(5, "平衡千⽄顶"),
    SIX(6, "侧推千⽄顶"),
    SEVEN(7, "抬底千⽄顶"),
    EIGHT(8, "⼀级护帮千⽄顶"),
    NINE (9, "二级护帮千⽄顶"),
    TEN(10, "三级护帮千⽄顶"),
    ELEVENTH(11, "伸缩梁千⽄顶"),
    TWELFTH(12, "尾梁千⽄顶"),
    THIRTEENTH(13, "插板千⽄顶"),
    FOURTEENTH(14, "前梁千⽄顶"),
    FIFTEENTH(15, "底调千⽄顶"),
    SIXTEENTH(16, "移后溜千⽄顶"),
    SEVENTEENTH(17, "掩梁⽴柱"),
    EIGHTEENTH(18, "侧帮千⽄顶"),
    NINETEENTH(19, "调推杆千⽄顶"),
    TWENTIETH(20, "调运输机千⽄顶"),
    PRESSINGBOARD(21, "挡矸千⽄顶"),
    PUSHANDPULL(22, "推拉千⽄顶"),
    TOPBEAMFRAME(23, "'顶梁调架千⽄顶"),
    BASETHEHOLDER(24, "底座调架千⽄顶");

    private final Integer no;

    private final String title;

    public static OilcylinderEnum parse(Integer no) {
        return Arrays.stream(OilcylinderEnum.values()).filter(input -> input.getNo().equals(no)).findFirst()
            .orElse(null);
    }
}
